
package com.jf.cloud.combo.feign;

import com.jf.cloud.api.combo.feign.ComboOrderFeignClient;
import com.jf.cloud.combo.service.ComboOrderService;
import com.jf.cloud.combo.service.ComboService;
import ma.glasnost.orika.MapperFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Hidden;

/**
 * @author zz
 * @date 2022/9/5 16:10
 */
@RestController
@Hidden
public class ComboOrderFeignController implements ComboOrderFeignClient {
    @Autowired
    private ComboOrderService comboOrderService;
    @Autowired
    private MapperFacade mapperFacade;
    @Autowired
    private ComboService comboService;

//    @Override
//    public ServerResponseEntity<Void> saveComboOrder(List<ComboOrderDTO> comboOrderDTOList) {
//        comboOrderService.batchSave(comboOrderDTOList);
//        List<ComboDTO> comboDTOList = new ArrayList<>();
//        for (ComboOrderDTO comboOrderDTO : comboOrderDTOList) {
//            Integer comboNum = comboOrderDTO.getComboNum();
//            ComboDTO combo = new ComboDTO();
//            combo.setComboId(comboOrderDTO.getComboId());
//            combo.setSoldNum(comboNum);
//            comboDTOList.add(combo);
//        }
//        comboService.comboSoldNumAdd(comboDTOList);
//        return ServerResponseEntity.success();
//    }

}
